<script>
    $(function(){
<?php if($parents): ?>
        $('.item').removeClass('on');
<?php if(!FUNC::getV('depart_id')):?>
        $('#selectAll').addClass('on');
<?php endif ?>
<?php endif ?>

        $.ajaxSetup({
            async: false
        });
        var group = Array('部门', '科目', '文件');
<?php $s = 0; ?>
<?php foreach($parents as $key=>$parent): ?>
        $('.s_menu_<?php echo $parent ?>').addClass('on').removeClass('off');
<?php $s++; ?>
<?php endforeach ?>
        $('#group_'+query('depart_id')).addClass('on');

        $.ajaxSetup({
            async: true
        });
    });
</script>

<div class="subnav w934">
    <div class="tit"></div>
    <div class="cont">
        <ul>
            <li><b>科 组：</b></li>
            <li class="on item" id="selectAll"><a href="<?php echo url('articles', array('col_id'=>FUNC::getV('col_id')))  ?>">全部</a></li>
            <li><b>:</b></li>
            <?php foreach($groups as $key => $group): ?>
            <li class="item" id="group_<?php echo $group->depart_id ?>"><a href="<?php echo url('', array('col_id'=>FUNC::getV('col_id'), 'depart_id'=>$group->depart_id)) ?>"><?php echo $group->name ?></a></li>
            <li><b>:</b></li>
            <?php endforeach ?>
        </ul>
    </div>
</div>